package com.mxpio.erp.common.inventory.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.mxpio.erp.common.jpa.model.OrderLine;

import com.mxpio.erp.common.technology.entity.Item;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_INV_WO_LINE")
@Schema(description="仓单行")
public class WarehouseOrderLine extends OrderLine {

	private static final long serialVersionUID = 1L;

	@Column(name = "ORIGIN_BIZ_LINE_NO_")
	@Schema(description = "来源单行号")
	private String originBizLineNo;
	
	@Column(name = "ORIGIN_BIZ_NO_")
	@Schema(description = "来源单号")
	private String originBizNo;
	
	@Column(name = "MEMO_")
	@Schema(description = "备注")
	private String memo;

	@Column(name = "ORIGIN_NOTICE_NO_")
	@Schema(description = "来源通知单单号")
	private String originNoticeNo;

	@Column(name = "ORIGIN_NOTICE_LINE_NO_")
	@Schema(description = "来源通知单行号")
	private String originNoticeLineNo;

	@Transient
	@Schema(description = "实时库存数量")
	private BigDecimal liveStockQuantity;

	//@Column(name = "MATERIAL_BRAND_")
	@Transient
	@Schema(description = "材料牌号")
	private String materialBrand;
	@Transient
	@Schema(description = "材料类型")
	@Dict(dicCode = "ERP_TECH_MATERIAL_TYPE")
	private String materialType;
	@Transient
	@Schema(description = "密度（g/cm3）")
	private BigDecimal materialDensity;
	@Transient
	@Schema(description = "直径（mm）")
	private BigDecimal materialDiameter;
	@Transient
	@Schema(description = "壁厚（mm）")
	private BigDecimal materialThickness;

	@Transient
	@Schema(description = "仓单主单对象")
	private WarehouseOrder warehouseOrder;
/*	@Transient
	@Schema(description = "下料长度")
	private BigDecimal makeLength;
	@Transient
	@Schema(description = "下料面积")
	private BigDecimal makeArea;
	@Transient
	@Schema(description = "可制数量")
	private BigDecimal makeNum;*/
	@Transient
	@Schema(description = "仓单明细对应流水对象")
	private List<VInvFlow> flowList;

	@Transient
	@Schema(description = "仓单明细对应流水报表对象")
	private List<VInvFlowBusiDetail> flowBusiDetailList;
}
